package com.example.cognitivesystemserver.controller;

import com.example.cognitivesystemserver.pojo.Evaluation;
import com.example.cognitivesystemserver.service.EvaluationService;
import com.example.cognitivesystemserver.service.EvaluationServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
public class EvaluationController {

    @Autowired
    private EvaluationService evaluationService;

//    //返回具体某个学生测评结果。。。。。
//    @GetMapping("/Eval/ShowRes")
//    public ModelAndView getEvaluationRes(String StuId){
//        ModelAndView modelAndView=new ModelAndView();
//        Evaluation evaluation=evaluationService.getEvaluationRes(StuId);
//        modelAndView.addObject("evaluation",evaluation);
//        modelAndView.setViewName("studentEvaluation");
//        return modelAndView;
//    }
//
//
//    //保存评估结果
//    @PostMapping("/Eval/saveRes")
//    public Object saveEvalRes(HttpServletRequest req) {
//
//        return null;
//    }

    //查看全部学生测评结果
    @GetMapping("/Eval/getAllEval")
    @ResponseBody
    public Object getAllEval() {
        return evaluationService.getAllEval();
    }
}
